package cuit.lh.remotecontrol.utlis;

import cuit.lh.remotecontrol.User;

import java.sql.*;

/**
 * @Classname: JDBCutils
 * @Author: Stonffe
 * @Date: 2024/5/4 17:32
 */
public class JDBCutils {
    private static String url = "jdbc:mysql://localhost:3306/remote";
    private static String username = "root";
    private static String password = "root";
    public static Connection getConnection() {
        Connection connection = null;
        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
            connection = DriverManager.getConnection(url, username, password);
        } catch (SQLException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        return connection;
    }

    public static void main(String[] args) throws SQLException {

    }
}
